package org.xiaojinlong.explore;

/**
 * Danger! Danger!
 * @author Jin Long
 * 2015/10/1
 */
public class BaseX {
    public String baseName = "base";

    public BaseX() {
        callName();
    }

    public void callName() {
        System.out.println(baseName);
    }

    static class Sub extends BaseX {
        public String baseName = "sub";

        public void callName() {
            System.out.println(this.baseName);
        }
    }

    public static void main(String[] args) {
        BaseX b = new Sub();
        b.callName();
    }
}
